package logistics.listener;

import order.model.OrderInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "order.create")
public class OrderListener {

    @RabbitHandler
    public void handMessage(String orderInfo){
        System.out.println("接收到订单消息 String: " + orderInfo);
        //接收到订单消息后,进行相应的业务处理
    }

    @RabbitHandler
    public void handMessage(OrderInfo orderInfo){
        System.out.println("接收到订单消息 OrderInfo: " + orderInfo);
        //接收到订单消息后,进行相应的业务处理
    }
}